
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <meta content="" name="description"/>
    <meta content="webthemez" name="author"/>
    <title>15天内到期客户</title>
    <link rel='stylesheet' type='text/css' href='../../../css/bootstrap2.min.css'>
	<link rel="stylesheet"
	href="../../../assets/bootstrap-table/bootstrap.min.css"><!-- 必须注意引入顺序  -->
	<link rel="stylesheet"
	href="../../../assets/bootstrap-table/bootstrap-table.css">
	<link rel="stylesheet"
	href="../../../assets/bootstrap-table/bootstrap-editable.css">
	<script src="../../../assets/bootstrap-table/jquery.min.js"></script>
	<script src="../../../assets/bootstrap-table/bootstrap.min.js"></script>
	<script src="../../../assets/bootstrap-table/bootstrap-table.js"></script>
	<script src="../../../assets/bootstrap-table/bootstrap-table-export.js"></script>
	<script src="../../../assets/bootstrap-table/tableExport.js"></script>
	<script src="../../../assets/bootstrap-table/bootstrap-table-editable.js"></script>
	<script src="../../../assets/bootstrap-table/bootstrap-editable.js"></script>
	<script src="../../../js/bootstrap-table-zh-CN.min.js"></script>
    <script src="../../../js/bootstrap-table-zh-CN.min.js"></script>
    <script type="text/javascript" src="../../../bootstrap/js/bootstrap-datetimepicker.js" charset="UTF-8"></script>

	
</head>

<body>
        <div class="header">
            <h1 class="page-header">15天内到期客户</h1>
        </div>


        <div id="page-inner">
            <div class="row">
                <div class="col-xs-12">
                    <div class="panel panel-default">
                        <div class="panel-body">
                            <div class="table-responsive">
                                <table id="table" class="table " data-toggle="table" data-toolbar="#toolbar"
                                       data-url="/shambles/mobile/finance/findMatureHire.do?days=15" data-search="true"
                                       data-striped="true"
                                       data-show-refresh="false" data-show-toggle="false"
                                       data-side-pagination="server" data-pagination="true"
                                       data-show-columns="false" data-sort-order="desc">
                                    <thead>
                                    <tr>
                                        <th data-align="left" data-field="charter" data-sortable="true" data-formatter="actionUser">姓名</th>
                                        <th data-align="left" data-field="idno">证件号</th>
                                        <th data-align="left" data-field="status" data-formatter="actionReport">查看详情</th>
                                        <th data-align="left" data-field="totalHire" data-sortable="true">金额</th>
                                        <th data-align="left" data-field="chartBeginDate" data-formatter="actionTime" data-sortable="true">开始日期</th>     
                                        <th data-align="left" data-field="chartEndDate" data-formatter="actionTime" data-sortable="true">结束日期</th>    
                                        <th data-align="left" data-field="chartType">付款方式</th>                          
                                        <th data-align="left" data-field="roomAddress" data-formatter="actionAddress">地址</th>
                                        <th data-align="left" data-field="contractNo" >合同编号</th>
                                        <th data-align="left" data-field="chartGUID" data-visible="false">合同ID</th>
                                    </tr>
                                    </thead>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>



</div>
<!-- 警告对话框 -->
<div class="modal fade" id="alertdialog" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header blue">
                <div>
                    <strong id="alertchar" style="font-size:20px"></strong>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">取 消</button>
                    <button type="button" id="commitFoodDataButton" class="btn btn-primary">添 加</button>
                </div>
            </div>
        </div>
    </div>
</div>


<script type="text/javascript">
 
    function getcookie(name) {
        var arr, reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)");
        if (arr = document.cookie.match(reg))
            return unescape(arr[2]);
        else
            return null;
    }


    $.get("/shambles/mobile/asset/upUserAccessTime.do",{
		parameter:"matureChartInfo"
	},function(text){
	
	});
    
    
    function actionReport(value, row, index) {
    		return [
                	// '<a  href="javascript:void(0)" onclick="report(this);" title="点击查看征信报告">',
                	// '&nbsp;<img src="img/detail.jpg" width="25px" height="25px">&nbsp;',
                	// '</a>&nbsp;',
                	'<button type="button" title="查看详情"  class="btn btn-success">查看详情</button>'
            		].join('');
    }

    $('#table').on("click-cell.bs.table",function(e, row, $element,field) {

        console.log(row+"  "+field.contractNo+"  "+field.guid);
        
        if(row=="status"){
        	var chartGUID =encodeURI(field.guid);
        	var name=encodeURI(field.charter);
        	var roomAddress=encodeURI(field.roomAddress);
        	window.location.href = "hire.html?chartGUID="+chartGUID+"&name="+name+"&roomAddress="+roomAddress;
        }else if(row=="charter"){
        	var idNo = field.idno;
        	
        	$.get("/shambles/mobile/finance/getChartInfoByIdNo.do", {
            	idNo:idNo
            },function(text){
            	
            	var json = $.parseJSON(text);
            	
            	console.log(json.guid);
            	
            	var chartGUID=encodeURI(json.guid);
            	
            	window.location.href = "assetChartState.html?chartGUID="+chartGUID;
            });
        	
        }else if(row=="roomAddress"){
        	var idNo = field.idno;
        	$.get("/shambles/mobile/finance/getRoomInfoByIdNo.do", {
            	idNo:idNo
            },function(text){
            	
            	var json = $.parseJSON(text);
            	
            	console.log(json.guid);
            	
            	var guid=encodeURI(json.guid);
            	
            	window.location.href = "assetChartDetail.html?guid="+guid;
            });
        }
    });
    
 
    
    function actionUser(value, row, index) {
        return [
            '<a  href="javascript:void(0)" title="点击查看用户详情">',
            value,
            '</a>'].join('');
    }
    
       
    function actionAddress(value, row, index) {
        return [
            '<a  href="javascript:void(0)"  title="点击查看用户详情">',
            value,
            '</a>'].join('');
    }
    
    function actionTime(value, row, index){
        var date = new Date(value);
        Y = date.getFullYear() + '-';
        M = (date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1) : date.getMonth()+1) + '-';
        D = date.getDate() + ' ';
        h = date.getHours() + ':';
        m = date.getMinutes() + ':';
        s = date.getSeconds();
        return Y+M+D;
    }

</script>
</body>

</html>